<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="shortcut icon" href="static/img/pub/lovsvol_64.ico">
    <link rel="stylesheet" href="public/static/css/base.css?v=1603154928996">
    <link rel="stylesheet" href="plugins/topNav/css/head.css?v=1603154928996">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap.css?v=1603154928996">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap-grid.css?v=1603154928996">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap-reboot.css?v=1603154928996">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>

</head>


<script>
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] === variable) {
                return pair[1];
            }
        }
        return (false);
    }

    $(function () {
        // var URL = "http://localhost:8080/smart_movies/ClassifyController";
        var id = getQueryVariable("cataLog_id");
        let params = {
            id: id
        }
        $.get("ClassifyController", params, function (data) {
            if (data.status === 200 ) {

                //初始限制展示条数
                let num1 = 1;
                //获取数据集
                let html1 = "";


                for (let i = 0; i < data.data.films.length; i++) {

                    // if (data.data.films[i].cateLogName != null && "电影" === data.data.films[i].clteLogName) {
                        if (num1 <= 12) {
                            html1 += "<div style='float: left' id='all2'>" +
                                "<ul id='up'>" +
                                "<li class='start'>" +
                                "<a href=detail.html?film_id=" + data.data.films[i].id + ">" +
                                "<div style='display: inline' id='neibu' class='t_image' >" +
                                "<img style='width: 117px; height: 160px'  solid #ddd;padding: 10px;background: white;  id='imgs' src=" + data.data.films[i].image +  " />" +
                                "</div>" +
                                "</a>" +
                                "<p style='color: #00AFE4' id='one'>" + data.data.films[i].name + "</p>" +
                                "<p id='tow' >" + data.data.films[i].onDecade + "</p>" +
                                "<p id='three'>" + data.data.films[i].typeName + "</p>" +"<br/>"+
                                "</li>" +
                                "</ul>" +
                                "</div>";
                        }

                }
               $("#change").html(html1);



            }
        });
    });

</script>

<body>



    <div class="sc">
        <div class="case1">
            <ul id="change">
            </ul>
        </div>
    </div>



</body>
</html>